<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>19_函数参数高级-案例练习-求平均数</title>
    </head>
    <body>
        <script>
            function avg(){

                var sum = 0;

                for(var i = 0; i < arguments.length; i++){
                    sum += arguments[i];
                }

                console.log(sum / arguments.length);

            }

            avg(1,2,3,4,5);
        </script>
    </body>
</html>